package mhl.service;

import mhl.dao.MultiTableBeanDAO;
import mhl.domain.MultiTableBean;

import java.util.List;

/**
 * @author DCSGO
 * @version 1.0
 */
public class MultiTableBeanService {
    private final MultiTableBeanDAO multiTableBeanDAO = new MultiTableBeanDAO();

    public List<MultiTableBean> getAll() {
        String sql = "SELECT bill.*,`name`,price FROM bill,menu WHERE menu.id = bill.menuId;";
        return multiTableBeanDAO.queryMulti(sql, MultiTableBean.class);
    }
}
